#ifndef QWGRAPHICSVIEW_H
#define QWGRAPHICSVIEW_H

#include <QGraphicsView>
#include<QGraphicsItem>
#include<QMouseEvent>
#include<QtDebug>
#include<QGraphicsSceneWheelEvent>
#include<QScrollBar>


class QWGraphicsView : public QGraphicsView
{
   Q_OBJECT
public:
    QWGraphicsView(QWidget *parent=0);
public:
    bool isMousePressed=false;
    bool isRightMousePressed=false;
    QPoint startPoint;
    QPoint endPoint;

    double zoomFactor;
protected:
    void mouseMoveEvent(QMouseEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void wheelEvent(QWheelEvent *event) override;

public:
    void setZoomFactor(double newZoomFactor);
signals:
    void mouseMovePoint(QPoint point, QPoint endP,QPoint startP);
};





#endif // QWGRAPHICSVIEW_H
